<?php

/**
 * 对象
 *
 */

class Object {

    static private $_instance = NULL;
    public $abc = 'fuck';

    public function __construct()
    {
        self::$instance = & $this;
    }

    // 返回对象的单例
    public function &getInstance()
    {
        if (self::$_instance === NULL)
        {
            throw new exception('You must instance the object');
        }

        return self::$_instance;
    }
}
?>